<%@ include file="/WEB-INF/pages/common/taglibs.jsp" %>
<script type="text/javascript">
    function changePassword() {
        var currentForm = document.forms["changePasswordForm"];
        currentForm.elements["userModel.userId"].value=currentForm.elements["userModel.userId"].value.trim();
        currentForm.elements["userModel.userPassword"].value=currentForm.elements["userModel.userPassword"].value.trim();
        currentForm.elements["userModel.newPassword"].value=currentForm.elements["userModel.newPassword"].value.trim();
        currentForm.elements["userModel.confirmPassword"].value=currentForm.elements["userModel.confirmPassword"].value.trim();
        $("td").removeClass("showErrorClass");
        if(validationMonitorForm('<s:text name="label.required.prefix"/>')){
            submitForm("changePasswordForm", "changePassword.action");
        }
        return false;
    }

    function cancelChangePassword() {
        submitForm("changePasswordForm", "cancelChangePassword.action");
    }    
</script>

<s:form name="changePasswordForm" action="" >
	<table width="100%" cellpadding="0" cellspacing="0">
        <tr>
        <td align="left" valign="bottom" class="main_page_content_icon" width="4%">
            <img src='<s:url value="/images/body-icon_check.gif"/>'  width="29" height="44"/>
        </td>
        <td valign="bottom" class="page_title_bg" width="96%"><span class="page_title"><s:text name="label.change.password"/></span></td>
    	</tr>
    </table>
	<table class="sectionBorder" width="100%">  
        <tr>
            <td class="form_label_padded" width="10%" nowrap><s:text name="label.userId"/></td>
            <td class="form_label_padded" width="2%">:</td>
            <td class="txtData" align="left">
                <s:textfield name="userModel.userId" maxLength="30" cssStyle="width:120px"/>
            </td>
        </tr>      
        <tr>
            <td class="form_label_padded" width="10%" nowrap><s:text name="label.old.password"/></td>
            <td class="form_label_padded" width="2%">:</td>
            <td class="txtData" align="left">
                <s:password name="userModel.userPassword" maxlength="30" cssStyle="width:120px"/>
            </td>
        </tr>
        <tr>
            <td class="form_label_padded" width="10%" nowrap><s:text name="label.new.password"/></td>
            <td class="form_label_padded" width="2%">:</td>
            <td class="txtData" align="left">
                <s:password name="userModel.newPassword" maxLength="30" cssStyle="width:120px"/>
            </td>
        </tr>          
        <tr>
            <td class="form_label_padded" width="10%" nowrap><s:text name="label.confirm.password"/></td>
            <td class="form_label_padded" width="2%">:</td>
            <td class="txtData" align="left">
                <s:password name="userModel.confirmPassword" maxLength="30" cssStyle="width:120px"/>
            </td>
        </tr>
        <tr>
            <td class="txtData" colspan="3">
                <input type="button" class="button" value="<s:text name='label.save'/>" onclick="changePassword();">
                <input type="button" class="button" value="<s:text name='label.back'/>" onclick="cancelChangePassword();">
            </td>
        </tr>
    </table>
</s:form>



